//
//  MHViewController+MHCommonAlert.m
//  MiaoCircle
//
//  Created by 许正荣 on 2018/4/26.
//  Copyright © 2018年 acgera. All rights reserved.
//

#import "MHViewController+MHCommonAlert.h"
#import "MHAlertTableViewView.h"
#import "MHAlertMessageView.h"

#import "zhWallView.h"

@implementation MHViewController (MHCommonAlert)


- (zhWallView *)wallView {
    CGRect rect = CGRectMake(100, 100, self.view.mh_width, 300);
    zhWallView *wallView = [[zhWallView alloc] initWithFrame:rect];
    wallView.wallHeaderLabel.text = @"";
    wallView.wallFooterLabel.text = @"取消";
//    wallView.models = [self wallModels];
//    [wallView autoAdjustFitHeight];
    return wallView;
}
-(void) showAlertViewControllerWithTitle:(NSString *) title content:(NSString *)content comfirmblock:(VoidBlock) comfirmblock dissMissBlock:(VoidBlock) dissMissBlock{
    self.zh_popupController = [zhPopupController new];
    MHAlertMessageView *alert = [[MHAlertMessageView alloc] initWihtTitle:title message:content];
    [alert.dissMissButton setTitle:@"取消" forState:0];
    [alert.comfirmButton setTitle:@"确定" forState:0];
    alert.mh_width = self.view.mh_width * 0.8;
    [alert.dissMissButton bk_whenTapped:^{
        if (dissMissBlock) {
            dissMissBlock();
        }
    }];
    [alert.comfirmButton bk_whenTapped:^{
        if (comfirmblock) {
            comfirmblock();
        }
    }];
    [self.zh_popupController presentContentView:alert duration:0.25 springAnimated:YES];
}




@end
